﻿<!DOCTYPE html>
<html>
  <head>
    <title>账户管理</title>
  </head>
  <script src="/resources/resources/scripts/jquery-1.7.1.min.js" type="application/javascript"></script>
<style>

  body {
    margin: 0;
    padding: 0;
  }
  table tr:nth-child(odd){
    background: #ccb249;

  }
  .ziti{
    font-size: 25px;
    font-weight: 500;
    font-family: 楷体;
  }
  </style>

  <script>

    $(function () {
        readList(1);
    })
    function readList(pageNum) {
        if (pageNum == 0) {
            pageNum = 1;
        }
        var userPhone = $("#userPhone").val();
        var formdata = new FormData();
        formdata.append("pageNum",pageNum);
        formdata.append("userPhone", userPhone);
        $.ajax({
            url: "/selectAll",
            data: {"pageNum":pageNum,"userPhone":userPhone},
            type: "post",
            dataType: "json",
            success: function (data) {
                var fenye = "";
                var a = data.list;
                $("#table").empty();
                for (var i = 0; i < a.length; i++) {
                    var s = a[i];
                    fenye += '<tr>' +
                        '<td>' + s.id + '</td>' +
                        '<td>' + s.userPhone + '</td>' +
                        '<td>' + s.userPasswrod + '</td>' +
                        '<td>' + s.unitName + '</td>'
                    '</tr>';
                }
                $("#table").append(fenye);
            }
        })
    }

  </script>
  <body>

      <br/>  <br/>  <br/>  <br/>  <br/>
      <div style="font-size:25px">
      手机号：<input value="" id="userPhone" name="userPhone" type="text">
        &nbsp; &nbsp; &nbsp; &nbsp;
        <input type="button" onclick="readList(1)" style="width: 60px" height="30px" value="查询">
      </div>

      <br/>  <br/>  <br/>  <br/>  <br/>
      <span class="ziti">
&nbsp;&nbsp;&nbsp;&nbsp;
    编号&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
       手机号&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
       密码&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
       单位名称</span>
    <table border="0" height="160px" width="700" id="table">
      <tr>
        <td>1</td>
        <td>2</td>
        <td>3</td>
        <td>4</td>
      </tr>
      <tr>
       <td>2</td>
        <td></td>
        <td></td>
        <td></td>
    </tr>
      <tr>
        <td>3</td>
        <td></td>
        <td></td>
        <td></td>
      </tr>
      <tr>
        <td>4</td>
        <td></td>
        <td></td>
        <td></td>
      </tr>
    </table>

  </body>
</html>
